home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
impressario
/
bin
/
examples
/
libstiff
/
README.z
/
README
Wrap
Text File
|
1996-05-06
|
2KB
|
59 lines
Example Programs
for
libstiff
These example programs demonstrate the use of the libstiff API. Each
program is designed to demonstrate a particular aspect of the API.
The programs also perform error handling using the library's error
handling facilities. Refer to the libstiff(3) man pages for detailed
information on the libstiff API.
sinfo - Usage: sinfo [STIFF file]
VERY USEFUL PROGRAM! Prints detailed information about a STIFF
format file. The header and IFD information is printed. For each
IFD the tags are printed. Offsets for IFD's and data are also
displayed. If a file is not specified on the command-line, stdin
is read. This is a very useful program for debugging a STIFF file
and for scanning the contents of a random STIFF file.
Note that this program uses the fields in the STStream structure
to follow the IFD pointers in order to extract information from
the tags in each IFD. This is considered an advanced technique
and would not normally be required when reading or writing STIFF
files in a conventional manner.
writeone - Usage: writeone
A demo program that reads an X format bitmap image and writes it
to a STIFF format file. This program demonstrates the use of the
libstiff functions that write STIFF files intended for printing.
These are the so called Print STIFF (PST) functions. These
functions write a STIFF format file with additional tags that may
be of use to printer drivers and filter programs. The resulting
STIFF image is written to stdout and can be sent to a file using
redirection.
band - Usage: band [STIFF file] [Output file]
Prints detailed information about the input STIFF file as in sinfo.
It also converts the STIFF file to 'banded' format. A 'band' format
file contains one row of each color. If there are three samples (colors)
per pixel ( eg. RGB ), then a single input pixel row is divided into
three smaller rows of the three colors.
For example,
RGBRGBRGB ...
becomes
RRR ...
GGG ...
BBB ...
Since this file format is not supported by STIFF currently, no header
information is attached with the data.